//
//  KSKAKatsudouTool.m
//  DashboardHD
//
//  Created by 楊亜玲 on 17/3/28.
//  Copyright © 2017年 Totyu. All rights reserved.
//

#import "KSKAKatsudouTool.h"
#import "KSKAKatsudouResult.h"

@implementation KSKAKatsudouTool

+(void)katsudouDailyListWithParam:(KSKAKatsudouParam *)param success:(void (^)(NSArray *array))success failure:(void (^)(NSError *error))failure{
    [KSKAHttpTool postWithURL:@"https://mimamori2.azurewebsites.net/dashboard/zwgetlrsuminfo.php" params:param.mj_keyValues success:^(id json) {
        if (success) {
            
            NSArray *tmpArr = [json objectForKey:@"lrsumlist"];
            NSArray *tmpArray = [KSKAKatsudouResult mj_objectArrayWithKeyValuesArray:tmpArr];

            success(tmpArray);
            
            
        }
    } failure:^(NSError *error) {
        if (failure) {
            failure(error);
        }
    }];
}
@end
